import { View, Text } from "react-native";
import { HeaderBackButton } from "@react-navigation/elements";
import Icon from "react-native-vector-icons/FontAwesome";
import { useNavigation } from "@react-navigation/native";
import React from "react";

export default function HeaderBack(props: any) {
  const navigation = useNavigation();

  return (
    <HeaderBackButton
      label="返回"
      labelVisible={false}
      backImage={() => <Icon name={"angle-left"} size={26} color={"#666"} />}
      {...props}
      onPress={() => {
        navigation.goBack();
      }}
    />
  );
}
